cmake_minimum_required(VERSION 3.16)
project(frpc_test C CXX)
set(PROJECT_NAME frpc_test )

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)



find_package(Threads REQUIRED)
find_package(Protobuf REQUIRED HINTS $ENV{CODE_DIR}/protobuf/install)
find_package(OpenSSL)

find_package(workflow REQUIRED CONFIG HINTS $ENV{CODE_DIR}/workflow)
set(WORKFLOW_LIB workflow ws2_32 wsock32 OpenSSL::SSL OpenSSL::Crypto)

link_directories(${WORKFLOW_LIB_DIR})

include_directories(
${WORKFLOW_INCLUDE_DIR}
${PROTOBUF_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIR}
$ENV{CODE_DIR}/cppbase
$ENV{CODE_DIR}/frpc_brpc/src
$ENV{CODE_DIR}/frpc_brpc/test_win
)

set(CPPBASE_LIB $ENV{CODE_DIR}/cppbase/build/Debug/cppbase.lib)




file(GLOB testwin_SRCS
     "*.cpp"
)
ADD_SUBDIRECTORY(../src/filestore ./build/filestore)
set(ALL_LIB 
${CPPBASE_LIB}
${CMAKE_THREAD_LIBS_INIT}
    ${PROTOBUF_LIBRARIES}
    ${WORKFLOW_LIB}
    ${OPENSSL_CRYPTO_LIBRARY}
    ${OPENSSL_SSL_LIBRARY}
filestore
)
add_executable(t ${testwin_SRCS} )


target_link_libraries(t  ${ALL_LIB})


